package com.lzw.breezeNovel.webApp.controller.common;

import com.lzw.breezeNovel.common.result.Result;
import com.lzw.breezeNovel.webApp.service.common.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.common
 * @date 2025/3/17
 * @description 通告的控制了
 */
@RequestMapping("/app/notice")
@RestController
@SuppressWarnings("all")
public class NoticeController {

    /**
     * 注入service
     */
    @Autowired
    private NoticeService noticeService;

    /**
     * 更具类型获取通告信息
     */
    @RequestMapping("/getNoticeByType")
    public Result<List<String>> getNoticeByType(@RequestParam Long type) {
        List<String> noticeByType = noticeService.getNoticeByType(type);
        return Result.ok(noticeByType);
    }

}
